-
Notifications
You must be signed in to change notification settings - Fork 1.4k
🌱 Migrate from Requeue to RequeueAfter in kcp #13028
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
🌱 Migrate from Requeue to RequeueAfter in kcp #13028
Conversation
|
This PR is currently missing an area label, which is used to identify the modified component when generating release notes. Area labels can be added by org members by writing Please see the labels list for possible areas. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mix them without separating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just intentionally added these in the PR merged yesterday. Please keep them (please see the godocs I explicitly added to the nolint statements)
(please revert all changes to this file, this util will soon'ish also be used in other controller / repos. It has to handle Requeue appropriately and must have the corresponding unit test coverage for it)
neolit123
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
given this PR is a task from the parent issue.
- how are we deciding on 10 seconds vs 20 seconds in various places?
- should we add some constants in a central file?
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: neolit123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just intentionally added these in the PR merged yesterday. Please keep them (please see the godocs I explicitly added to the nolint statements)
(please revert all changes to this file, this util will soon'ish also be used in other controller / repos. It has to handle Requeue appropriately and must have the corresponding unit test coverage for it)
|
/hold Until the findings are resolved |
952c490 to
be6829d
Compare
|
I addressed review findings. |
|
@sivchari Looks like unit tests are failing :) |
sbueringer
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only reviewed the prod code. One finding for that
| }) | ||
|
|
||
| return ctrl.Result{Requeue: true}, nil | ||
| return ctrl.Result{}, nil // No need to requeue here. Machine deletion above triggers reconciliation. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return ctrl.Result{}, nil // No need to requeue here. Machine deletion above triggers reconciliation. | |
| return ctrl.Result{RequeueAfter: time.Millisecond}, nil // Technically there is no need to requeue here. Machine deletion above triggers reconciliation. But we have to return a non-zero Result so reconcile above returns. |
My bad. We have to requeue here otherwise the reconcile func one level higher does not return which it absolutely has to
(using 1 ms so we don't get an additional requeue on top of the requeue we get from Machine deletion. With e.g. 10s we might get an additional requeue)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also missed it. Thanks!
Signed-off-by: sivchari <[email protected]>
be6829d to
d92adfc
Compare
What this PR does / why we need it:
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)format, will close the issue(s) when PR gets merged):Part of #12272